Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds CAN2 and CAN3 support for the G4 devices.
I have tested that FDCAN2 does actually send can frames. I haven't done more in-depth tests of FDCAN2 yet, or tested FDCAN3 but I feel like it's safe to assume that stuff will work.
The datasheet is a bit misleading. Table 3 would make you think the message ram is divided into 1K blocks.
![image](https://private-user-images.githubusercontent.com/10556538/326634782-fa7366ce-37c8-4e8d-95a2-df02d33ae462.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM2Njc3NzIsIm5iZiI6MTcyMzY2NzQ3MiwicGF0aCI6Ii8xMDU1NjUzOC8zMjY2MzQ3ODItZmE3MzY2Y2UtMzdjOC00ZThkLTk1YTItZGYwMmQzM2FlNDYyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE0VDIwMzExMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWMwNzhmYjU1NjA5ZGJjN2QzNzA2NzAyNzZhYmMyNWM0ZTRlNGY4M2M0MzI2ZDVkOTJlNDU4MjEyZjE2OGUzMWEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.IRMK5ZG9ah30Izh3PJ6OVOINUrnNHx6ale9e4uGhboM)
But actually the blocks are smaller:
![image](https://private-user-images.githubusercontent.com/10556538/326635000-b87206f0-041c-48f9-a913-1d69ecc14738.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM2Njc3NzIsIm5iZiI6MTcyMzY2NzQ3MiwicGF0aCI6Ii8xMDU1NjUzOC8zMjY2MzUwMDAtYjg3MjA2ZjAtMDQxYy00OGY5LWE5MTMtMWQ2OWVjYzE0NzM4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE0VDIwMzExMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI1NjA2NzRiYzk5MjM2Y2EwNzI1NzBkMWJlOGVhNmY2YTVlOTE5NDZiMjFmZjY1MWU2ZGM2NTNiNzllODUyZDImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.XAgogmoQN88Pl7MpQV4VXu-LIHuI4D-fm31Iok6a6qw)